﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EventSys : MonoBehaviour {

    public delegate void myDel();
    public event myDel mm;

    // Use this for initialization
    void Start () {
        mm += A;

    }
	
	// Update is called once per frame
	void Update () {
        if (Input.GetKeyDown(KeyCode.P))
        {
            S();
        }
	}

    public void A()
    {
        Debug.Log("我是A");
    }

    public void B()
    {
        Debug.Log("我是B");
    }

    public void C()
    {
        Debug.Log("我是C");
    }

    public void S()
    {
        mm();
    }
}
